<?php
namespace app\controller;


use think\Response;

abstract class Base
{
    
    protected function create($data,$msg = '',$code = 20000,$type = 'json'){
        //生成标准API
        $result = [
            'code'  =>  $code,
            'msg'  => $msg,
            // 'total' =>$total,
            'data'  =>$data
        ];
        return Response::create($result,$type);

    }
}


